package org.example.enums;

public enum DomainTypeEnum {

    REGISTER(1,"0000000","恭喜您可以注册"),ALREADY_REGISTERED(2,"0000000","已注册"),
    LIMITED_REGISTRATION(3,"0040011","限制注册"),RESERVED_WORDS(4,"0040011","保留词"),
    NOT_SUPPORTED(5,"","不支持该类后缀查询");

    private int id;

    private String code;

    private String msg;

    DomainTypeEnum(int id, String code,String msg) {
        this.id = id;
        this.code = code;
        this.msg = msg;
    }

    public static DeleteTypeEnums getEnum(int id){
        for (DeleteTypeEnums enums: DeleteTypeEnums.values()){
            if (enums.getId()==id) {
                return enums;
            }
        }
        return null;
    }

    public int getId() {
        return id;
    }

    public String getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
